package com.moshang.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: blog
 * @description: 分类实体类
 * @author: xieweiwei
 * @create: 2018-11-15 18:08
 **/
@TableName("tbl_sort_info")
@Data
public class TbSort extends BaseEntity {
    @TableId(type = IdType.AUTO)
    public Integer id;

    public String name;

    public Integer number;

    public Integer sort;
    public Integer parentId;
    /**是否开启 默认开启*/
    @TableField(exist = false)
    private boolean open=true;
    /**是否选择 checkbox状态可用 默认未选中*/
    @TableField(exist = false)
    private boolean checked=false;
    @TableField(exist = false)
    private List<TbSort> children=new ArrayList<TbSort>();
}
